﻿@{
    ViewBag.Title = "网非e学院--邀请二维码";
}

<style>
    .BG {
        background-color: white;
        width: 100%;
        border: solid 1px #ddd;
        border-radius: 5px;
        box-shadow: 0px 10px 10px rgba(50, 50, 50, 0.3);
        line-height: 25px;
        margin-top: 10px;
    }

    .imgBG {
        width: 25%;
        height: 25%;
        border-radius: 50%;
        box-shadow: -10px 10px 10px rgba(50, 50, 50, 0.3);
    }

    .emwNew {
        background-image: url('../../Image/yqback.jpg');
        background-size: 100%;
        text-align: center;
    }

    .emwYQK {
        background-image: url('../../Image/yqdbx.png');
        background-size: 100%;
        background-repeat: no-repeat;       
        width: 140px;
        height: 60px;
        line-height: 50px;
        color: black;
        font-size: 18px;
        font-weight: bold;
        display: inline-block;
        margin-top: 50px;
    }

    .ewmText {
        margin-top: 40px;
        width: 80%;
        border: solid 2px #952b15;
        position: relative;
        padding-top: 50px;
        margin-left: auto;
        margin-right: auto;
        color: #333;
        font-size: 16px;
        line-height: 25px;
    }

    .ewmImg {
        width: 24%;
        border-radius: 50%;
        position: absolute;
        left: 38%;
        top: -40px;
    }
</style>
<!--
<div id="divEWM" style="background-color:white;text-align:center">
    <br />
    <div style="line-height:25px; color:#F6AC1A; font-size:17px; font-weight:bold">
        <img src="~/Image/logoXzl.png" width="30" height="25" />
        网非网络学院 | 有魔法的课堂
    </div>
    <div style="width:80%; margin-left:auto;margin-right:auto;margin-top:20px">
        <div class="BG">
            <b>
                我是 @ViewBag.NickName<br />
                邀请您免费注册网非情商会员
            </b>
        </div>
        <br />
        <div class="BG">
            <img src="http://qr.topscan.com/api.php?text=@ViewBag.Link" style="width:80%" /><br />
            @*<img src="http://qr.topscan.com/api.php?&logo=@ViewBag.HeadImg&text=@ViewBag.Link" style="width:80%" /><br />*@
            <p is="null">长按识别&nbsp;免费注册<br />如不识别,请设法在微信中打开<br />或者<a href="~/MyInfo/InviteByLink?Code=@ViewBag.UserNum">"点击这里"</a> 直接进入</p>
        </div>
        <div style="margin-top:20px;">
            <img src="@ViewBag.HeadImg" class="imgBG" /><br />
            <span style="color:#666; line-height:30px;">@ViewBag.NickName</span>
        </div>
    </div>
</div>
-->
<div id="divEWM" class="emwNew">
    <div style="color:black;font-size:20px; font-weight:bold;padding-top:20px;">网非网络学院 | 有魔法的课堂</div>
    <div class="emwYQK">专属邀请卡</div>
    <div class="ewmText">
        <img class="ewmImg" src="@ViewBag.HeadImg" />
        我是 @ViewBag.NickName<br />
        我正在网非网络学院学习，<br />
        对我在孩子教育方面帮助很大，<br />
        也推荐给你，希望与你结伴学习，<br />
        共同成长！<br /><br />
        <img src="http://qr.topscan.com/api.php?text=@ViewBag.Link" style="width:70%" /><br /><br />
        <b>长按扫描上方二维码</b><br /><br />
    </div><br />
</div>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    wx.config({
        debug: false,
        appId: "@ViewBag.AppID",
        timestamp: "@ViewBag.Timestamp",
        nonceStr: "@ViewBag.NonceStr",
        signature: "@ViewBag.Sign",
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'] // 功能列表，我们要使用JS-SDK的什么功能
    });

    wx.ready(function () {
        // 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
        wx.onMenuShareTimeline({
            title: '我正在网非父母网络学院学习，推荐给你', // 分享标题
            link: "@ViewBag.Url",
            imgUrl: "@ViewBag.Address/Image/SharedEWM.jpg", // 分享图标
        });

        // 获取“分享给朋友”按钮点击状态及自定义分享内容接口
        wx.onMenuShareAppMessage({
            title: '我正在网非父母网络学院学习，推荐给你', // 分享标题
            desc: "精心打造的家庭教育系列课程，帮你更高效的获取育儿方法", // 分享描述
            link: "@ViewBag.Url",
            imgUrl: "@ViewBag.Address/Image/SharedEWM.jpg", // 分享图标
            type: 'link', // 分享类型,music、video或link，不填默认为link
        });
        //wx.error(function (res) {
        //    alert('wx.error: ' + JSON.stringify(res));
        //});
    });
</script>

<script>
    var hei = document.body.clientHeight;
    $("#divEWM").css("min-height", hei);
</script>
